//
//  NSDate+CLExtension.h
//
//  Created by joe on 10-6-12.
//  Copyright . All rights reserved.
//

#import <Foundation/Foundation.h>


@interface NSDate (CLExtension)

- (NSInteger)second;
- (NSInteger)minute;
- (NSInteger)hour;
- (NSInteger)day;
- (NSInteger)month;
- (NSInteger)year;
- (NSInteger)weekDay;
- (NSInteger)weekOfMonth;
- (NSInteger)weekOfYear;

/// 指定年月日时分秒生成date
+ (instancetype)dateByYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day hour:(NSInteger)hour minute:(NSInteger)minute second:(NSInteger)second;

/// 获取本地时间
+ (NSDate *)localDate;

///
- (NSDate*)yearStartDate;

///
- (NSDate*)monthStartDate;

///
- (NSDate*)weekStartDate;

///
- (NSDate*)weekEndDate;

/// 今天开始的时间
+ (NSDate*)startOfToDay;

@end


